package com.spzx.channel.controller;

import com.spzx.channel.service.IProductService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ProductController
 * Package: com.spzx.channel.controller
 * Description:
 */
@Tag(name = "商品管理")
@RestController
public class ProductController extends BaseController {
    @Autowired
    private IProductService productService;

    @Operation(summary = "获取商品详情")
    @GetMapping("/item/{skuId}")
    public AjaxResult getSkuDetail(@PathVariable("skuId") Long skuId){
        return success(productService.getSkuDetail(skuId));
    }
}
